﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using geetol.sms.core;

namespace geetol.sms.service
{
    public class util
    {
        public static bool CreateDataTable()
        {
            return smsLog();
        }

        static bool smsLog()
        {
            if (!DbHelperSQL.TabExists("gt_sms_sendLog"))
            {
                string sqlstr = @"CREATE TABLE [gt_sms_sendLog](
	[id] [bigint] IDENTITY(1,1) NOT NULL,
	[ctime] [datetime] NOT NULL,
	[mobile] [varchar](20) NOT NULL,
	[sms_txt] [nvarchar](500) NOT NULL,
	[sms_type] [int] NOT NULL,
    [taskid] [varchar](32) NOT NULL,
	[sms_res_stat] [varchar](32) NOT NULL,
	[sms_res_msg] [nvarchar](255) NOT NULL
) ";

                new Logs("sqllog").Write("gt_sms_sendLog ->" + DbHelperSQL.ExecuteSql(sqlstr));
                return true;
            }
            return true;
        }
    }
}
